Public Function GetWizardInfo(Names As Variant) As Long
ReDim Names(NUM_WIZARDS)
GetWizardInfo = NUM_WIZARDS
End Function
'Enumerate the names and values of a specified property
Public Function GetEnumNames(ByVal PropID As Long, Names As Variant, Values As Variant) As Long
End Function
Public Function PageControls(ByVal ThisRegenMethod As Object, ByVal Graphic As Object, ByVal PageNumber As Long, ByVal SaveProperties As Boolean) As Boolean
'Set up error function
On Error GoTo Failed
Dim i%
Dim Diameter#, Length#, LThread#
If SaveProperties Then
'OK button on property page was clicked
'Form is still loaded
With frmSample
'Need On Error statement for the case where you have
'RRect Turbo Shape and ahother "shape" selected
On Error Resume Next
'When the property page is closed, transfer the numeric
'Diameter value from the TextBox to the Graphic
'Get the value as a double-precision number
TypeN = .List1.Text
ViewN = .List2.Text
Diameter# = CDbl(.txtdd.Text)
LThread# = CDbl(.txtLenThread.Text)
'Make sure it's between 0 and 100
If Diameter# < 0# Then Diameter# = 1#
If Diameter# > 3# Then Diameter# = 3#
'Set the roundness property value in the Graphic
Graphic.Properties("DiameterN") = Diameter#
Graphic.Properties("NutType") = TypeN
Graphic.Properties("NutView") = ViewN
Graphic.Properties("LengthThreadN") = LThread
End With
Else
'Property page is about to be opened
'Make sure the form is loaded
Load frmSample
With frmSample
'If more than one RRect is selected and they do not
'have the same properties, don't set up this field
On Error GoTo NoRType
'When the property page is opening, transfer the numeric
'roundness value from the Graphic to the TextBox
'Get the roundness property value from the Graphic
Diameter# = Graphic.Properties("DiameterN")
TypeN = Graphic.Properties("NutType")
ViewN = Graphic.Properties("NutView")
LThread = Graphic.Properties("LengthThreadN")
'Set the TextBox control's text
.txtdd.Text = Diameter#
.List1.Text = TypeN
.List2.Text = ViewN
.txtLenThread.Text = LThread
NoRType:
End With
End If
PageControls = True
Exit Function
Failed:
'For debugging purposes, report that an error occurred
If Err.Number <> 0 Then
MsgBox "Error in PageControls: " & Err.Description
End If
'Return false if an error occurred
PageControls = False
End Function
Public Function PageDone(ByVal ThisRegenMethod As Object, Optional PageNumber As Variant)
'Done with form
Unload frmSample
End Function
Public Function PropertyPages(ByVal ThisRegenMethod As Object, Optional PageNumber As Variant) As Boolean
With frmSample
.Show vbModal
PropertyPages = Not .DialogCanceled
End With
End Function
Public Function Wizard(ByVal ThisRegenMethod As Object, Optional WizardNumber As Variant) As Boolean
Wizard = False
End Function
'Called when vertex has been moved, or other geometry change
Public Function OnGeometryChanged(ByVal Graphic As Object, ByVal GeomID As Long, paramOld As Variant, paramNew As Variant)
'Do nothing
'Regen Graphic
End Function
'Called when vertex is moved, or other geometry change
Public Function OnGeometryChanging(ByVal Graphic As Object, ByVal GeomID As Long, paramOld As Variant, paramNew As Variant) As Boolean
'OK to continue with change
OnGeometryChanging = True
End Function
Public Function OnNewGraphic(ByVal grfThis As Object, ByVal boolCopy As Boolean) As Boolean
If boolCopy Then
'Vertices are already added for us...
OnNewGraphic = True
Exit Function
End If
On Error GoTo Failed
'New Graphic being created
'X, Y, Z, PenDown, Selectable, Snappable, Editable, Linkable